<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" {% block html_attribs %}lang="en"{% endblock html_attribs %}>

<head>
  <title>{% block title %}{{title}}{% endblock title %}</title>

  {%- block meta %}
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  {%- if config['GOOGLE_ANALYTICS_ACCOUNT'] %}
  <meta name="author" content="{{config['GOOGLE_ANALYTICS_ACCOUNT']}}">
  {%- endif %}
  {%- endblock meta %}

  {%- block style %}
  {%- endblock style %}  

  {%- block favicons %}
  {%- endblock favicons %}
</head>

<body>
  {% for message in get_flashed_messages() %}
  <div class="flashmsg">{{message}}</div>
  {% endfor %}

  {%- block body_content %}
  {%- endblock body_content %}

  {% block js_bottom %}
  {% endblock js_bottom %}

  {%- if config['GOOGLE_ANALYTICS_ACCOUNT'] %}
  <script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', '{{config['GOOGLE_ANALYTICS_ACCOUNT']}}']);
    _gaq.push(['_trackPageview']);

    (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
  </script>
  {%- endif %}
</body>

</html>
